<%--
  Created by IntelliJ IDEA.
  User: SK
  Date: 2024/6/29
  Time: 17:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <title>User List</title>
    <style>.center-table {
        margin-left: auto;
        margin-right: auto;
    } </style>
</head>
<body>
<h1 align="center">用户列表</h1>
<table border="1" class="center-table">
    <tr>
        <th>ID</th>
        <th>User Code</th>
        <th>User Name</th>
        <th>User Password</th>
        <th>Gender</th>
        <th>Birthday</th>
        <th>Email</th>
        <th>Phone</th>
        <th>Address</th>
        <th>User Role</th>
        <th>Delete</th>
        <th>Edit</th>
    </tr>
    <c:forEach var="del" items="${userList}">
        <tr>
            <td>${user.id}</td>
            <td>${user.userCode}</td>
            <td>${user.userName}</td>
            <td>${user.userPassword}</td>
            <td>${user.gender}</td>
            <td>${user.birthday}</td>
            <td>${user.email}</td>
            <td>${user.phone}</td>
            <td>${user.address}</td>
            <td>${user.userRole}</td>
            <td><a href="delete?id=${user.id}">Delete</a></td>
            <td><a href="edit?id=${user.id}">Edit</a></td>
        </tr>
    </c:forEach>
</table>
</body>
</html>